//
//  HomeWebViewController.swift
//  SinaWeibo
//
//  Created by 张远文 on 16/4/25.
//  Copyright © 2016年 张远文. All rights reserved.
//

import UIKit
import SVProgressHUD
class HomeWebViewController: UIViewController,UIWebViewDelegate {

    
    var webView = UIWebView()
    var urlString: String?
    override func loadView() {
        view = webView
        webView.delegate = self
    }
    override func viewDidLoad() {
        super.viewDidLoad()

        if let url = NSURL(string: urlString ?? "") {
            let request = NSURLRequest(URL: url)
            
            webView.loadRequest(request)
        }
    }
    
    func webViewDidStartLoad(webView: UIWebView) {
        SVProgressHUD.show()
    }
    
    func webViewDidFinishLoad(webView: UIWebView) {
        SVProgressHUD.dismiss()
    }
    

}
